export default function (fun, delay = 200) {
    let timer = null;
    return function (...args) {
        clearTimeout(timer)
        timer = setTimeout(() => {
            fun(...args)
        }, delay)
    }

}